// 导入请求方式
import http from '../service/http.js'
// 视频接口
export function ShouYeVideo() {
	return http.get(`api/common/video/getPopularVideo`)
}
// 登录接口
export function LoginBY(params) {
 return http.post(`api/common/user/loginByPassword`, params)
}
// 验证码接口
export function yanzhenma(params) {
	return http.get(`api/common/user/getCode/${params.email}`)
}
// 注册接口
export function zhuce(params) {
	return http.post('api/common/user/register', params)
}
export function FollowerVideo(params) {
	return http.get(`api/user/${params.userId}/FollowerVideo/page/1`)
}
// 搜索
export function postsearchVideoAPI(params) {
	return http.post(`api/user/${params.userId}/searchVideo/1`, params)
  }
  export function postsearchUserAPI(params) {
	return http.post(`api/user/${params.userId}/searchUser/1`, params)
  }
// 个人
export function logout(params) {
	return http.get(`api/user/${params}/logout`)
  }
  //获取作品视频的数量
export function getVideoNumAPI(params) {
	return http.get(`api/user/${params.userId}/VideosNum`)
}
//获取喜欢的视频数量
export function getlikeAPI(params) {
	return http.get(`api/user/${params.userId}/LikesNum`)
}
//获取关注的数量
export function getFollowerNumAPI(params) {
	return http.get(`api/user/${params.userId}/FollowersNum`)
}
//获取粉丝的数量
export function getFanNumAPI(params) {
	return http.get(`api/user/${params.userId}/FansNum`)

}
//获取获赞的数量
export function getbyLikesNumAPI(params) {
	return http.get(`api/user/${params.userId}/byLikesNum`)

}
//个人信息接口
export function getbygetUserInfoAPI(params) {
	return http.get(`api/user/${params.userId}/getUserInfo/undefined`)

}
// 修改个人信息接口
export function postmodifyUserInfoAPI(userId, params) {
	return http.post(`/api/user/${userId}/modifyUserInfo`, params)
}
// 修改上传头像接口
export function uploadAvatar(params) {
	return http.post(`api/user/${params.userId}/uploadAvatar`, params)
}
//获取作品视频
export function getVideoAPI(params) {
	return http.get(`api/user/${params.userId}/Videos/page/${params.pageNum}`)
  }
//获取作品喜欢的数量
export function getVideoLikesAPI(params) {
	return http.get(`api/user/${params.userId}/Likes/page/${params.pageNum}`)
  }
  export function modifyUserInfo(params, params2) {
	return http.post(`api/user/${params}/modifyUserInfo`, params2)
}
export function Fans(params) {
	return http.get(`api/user/${params.userId}/Fans/page/1/${params.userId}`)
}
export function guanzhu(params) {
	return http.get(`api/user/${localStorage.getItem('uid')}/triggerFollow/${params}`)
}
export function byLike(params) {
	return http.get(`api/user/${params.userId}/byLike/page/1`)
}
export function byLike2(params) {
	return http.get(`api/user/${params.userId}/getAt/page/1`)
}
export function byLike3(params) {
	return http.get(`api/user/${params.userId}/byComment/page/1`)
}
export function getContactAPI(params) {
	return http.get(`api/user/${params}/getContact`)
}

// 修改个人信息接口
export function postmodifyUsrInfoAPI(params) {
	return http.get(`api/user/${params.userId}/getUserInfo/undefined`)
}
// 修改上传头像接口
export function uploadAvata(userId, params) {
	return http.post(`api/user/${userId}/uploadAvatar`, params)
}
// export function modifyUserInf(params) {
// 	return http.post(`/user/${params}/modifyUserInfo`)
// }
export function modifyUserInf(params, params2) {
	return http.post(`api/user/${params}/modifyUserInfo`, params2)
}

//聊天
export function privateLetter(params) {
	return http.post(`api/user/${params.fromUserId}/privateLetter/${params.toUserId}`, params)
}
export function getPrivateLetter(params) {
	return http.get(`api/user/${params.userId}/getPrivateLetter/${params.meId}`)
}
// 评论
export function lun2(params) {
	return http.get(`api/video/${params}/getVideoComment/page/1`)
}
export function lunlove(params) {
	return http.get(`api/user/${params.userId}/triggerLikeComment/${params.videoId}/${params.commentId}`)
}
export function fabuplAPI(params) {
	return http.post('api/user/commentVideo', params)
}
// 视频
export function getHomeVideoListAPI(params) {
	return http.get('api/common/video/getPopularVideo', params)
}
export function triggerLike(params) {
	
	return http.get(`api/user/${params.userId}/triggerLike/${params.videoId}`)
}
// 上传视频
export function upLoadVideoAPI(params) {
	return http.post('api/user/uploadFile', params)
}
export function upLoadCoverVideoAPI(params) {
	return http.post('api/user/uploadCover', params)
}
export function publishVideoAPI(params) {
	return http.post(`api/user/${params.userId}/publishVideo`, params)
}
uploadAvata